﻿using Microsoft.AspNetCore.Mvc;
using WebApiTwo.IService;
using WebApiTwo.Model;

namespace WebApiTwo.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class StudentController : ControllerBase
    {
        private readonly IStudentService studentService;
        public StudentController(IStudentService studentService) {
            this.studentService = studentService;
        }

        [HttpGet]
       public Task<IEnumerable<StudentRes>> GetAllStudent()
        {
            return studentService.GetAllStudent();
        }
    }
}
